<?php
namespace app\servercertificate\validate;
use \app\manage\validate\BaseValidate;

class Invoice extends BaseValidate
{
    
	protected $rule =   [
        'id' => ['integer','gt'=>0],
        'user_id' => ['integer','gt'=>0],
        'pick_up_id' => ['integer','gt'=>0],
        'type' => ['in'=>'paper,electronic,added_value_tax,other'],
        'invoice_title' => ['in'=>'person,unit'],
        'unit_name'=>['requireIf'=>'invoice_title,unit', 'min'=>2],
        'page'=>['integer','gt'=>0],
        'listRows'=>['integer','gt'=>0,'elt'=>50]
    ];

    protected $message  =   [
    	'unit_name'=> '单位名称必须填写',
    ];

    protected $scene = [

    ];


}